@extends('layout.index')
@section('title','评论回复')
@section('content')
	<div class="mws-panel grid_8">
    	<div class="mws-panel-header">
        	<span>评论回复</span>
        </div>
        <div class="mws-panel-body no-padding">
        	<form action="/admin/comments/update" method='post' class="mws-form">
        		@if(count($errors) > 0)
        			<div class="mws-form-message error">
        				回复失败!
        				<ul>
        					@foreach($errors->all() as $error)
								<li>{{ $error }}</li>
        					@endforeach
        				</ul>
        			</div>
        		@endif

        		<div class="mws-form-inline">
        			<div class="mws-form-row">
        				<label class="mws-form-label">用户名</label>
        				<div class="mws-form-item">
        					<input type="text" name='username' readonly value='{{$comments->username}}' class="smallinfo">
        				</div>
        			</div>
        			
        			<div class="mws-form-row">
        				<label class="mws-form-label">商品名</label>
        				<div class="mws-form-item">
        					<input type="text" name='proname' readonly value='{{$comments->proname}}' class="smallinfo">
        				</div>
        			</div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">评论分数</label>
                        <div class="mws-form-item">
                            <input type="text" name='commentscore' readonly value='{{$comments->commentscore}}' class="smallinfo">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">评论时间</label>
                        <div class="mws-form-item">
                            <input type="text" name='commenttime' readonly value='{{$comments->commenttime}}' class="smallinfo">
                        </div>
                    </div>
                    <div class="mws-form-row">
                        <label class="mws-form-label">评论内容</label>
                        <div class="mws-form-item">
                            <textarea class="large autosize" readonly name='content' cols="" rows="" style="overflow: hidden; word-wrap: break-word; resize: none; height: 130px;">{{$comments->content}}</textarea>
                        </div>
                    </div>

                    <div class="mws-form-row">
                        <label class="mws-form-label">评论回复</label>
                        <div class="mws-form-item">
                            <textarea class="large autosize" name='recont' cols="" rows="" style="overflow: hidden; word-wrap: break-word; resize: none; height: 130px;">{{$comments->recont}}</textarea>
                        </div>
                    </div>
                    <input type="hidden" name='cont' value='{{$comments->content}}'>
                    <input type="hidden" name='retime' value="{{date('Y-m-d H:i:s',time())}}">
        			{{csrf_field()}}	
        		</div>
        		<div class="mws-button-row">
        			<input type="submit" class="btn btn-primary" value="回复">
        		</div>
        	</form>
        </div>    	
    </div>
@endsection